<?php

namespace App\Http\Controllers\Member;

use App\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class MemberController extends Controller
{
    //加载会员首页模板
public function index(){
    return view('member.member.index');
}
//会员信息修改后保存
public function storeInfo(Request $request){
$user=auth()->user();
//dd($user->toArray());
$user->update($request->all());
return back()->with('success','修改资料成功');
}
//修改头像
public function iconFrom(){
return view('member.member.iconForm');
}
//保存修改头像
public function icon(Request $request){
$user=auth()->user();
$date['icon']=$request['iconUrl'];
$user->update($date);
return back()->with('success','头像编辑成功');
}

}
